package com.fjec.common.okhttp;

import lombok.extern.slf4j.Slf4j;

import javax.net.ssl.X509TrustManager;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;

@Slf4j
public class MyX509TrustManager implements X509TrustManager {
    @Override
    public void checkClientTrusted(X509Certificate[] x509Certificates, String s)
            throws CertificateException {
        log.debug("自定义证书管理器:checkClientTrusted");
    }

    @Override
    public void checkServerTrusted(X509Certificate[] x509Certificates, String s)
            throws CertificateException {

        log.debug("自定义证书管理器:checkServerTrusted");
    }

    @Override
    public X509Certificate[] getAcceptedIssuers() {
        log.debug("自定义证书管理器:getAcceptedIssuers");
        return new X509Certificate[0];
    }
}
